<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>

</body>
<script>
	{
		// let age = 20;
		// const obj = {
		// 	a:1,
        //     "b":2,
        //     ["c"]:3,
        //     "#$%^&*()":200,
        //     [age]:2000
        // }
		// console.log(obj);
    }
  {
	  let b = 2;
	  let username = "zhangsan";
      const obj = {
		  a:1,
          [username]:"lisi",// username的值作为属性名
          username,
          b,// 将变量或常量的名字作为属性名，将变量或常量的值作为属性值
          fn(){

          },
          fn2:()=>{

          }
      }
	  console.log(obj);
  }
</script>
</html>